Skip to content

Conversation

@pete-vielhaber
Copy link
Contributor

@pete-vielhaber pete-vielhaber commented Dec 26, 2025

  • Removed Vercel redirect checker scripts and associations
  • Added typescript file: check-markdown.ts that checks for staged deletions of markdown (.md or .mdx) files
    • If files are deleted, a bit of an obnoxious message (but not overly so) will display so it doesn't get lost as a warning to the user
    • Also added functionality capturing rename/moving files
      • If not done properly using Git CLI to rename/move, script will capture it as a deletion
  • I assume we will need to update the vercel deployment to replace the script; as the current tests are failing.

anegg0 and others added 28 commits December 8, 2025 13:36
Modified the pre-commit hook to pass only staged markdown files to
markdownlint instead of running it on all files in the project.

Changes:
- Extract staged markdown files excluding docs/sdk/
- Pass filtered list directly to markdownlint via xargs
- Consistent with Prettier formatting approach (staged files only)

This ensures developers aren't blocked by markdown issues in files
they're not modifying, while still validating all committed changes.
…warning

TypeScript's tsc command requires full project context for accurate type
checking and cannot be limited to only staged files. This change:

- Adds SKIP_TS_CHECK environment variable to bypass the check
- Warns users that TypeScript checks the entire project
- Provides clear instructions when check fails on unrelated errors
- Improves error messages to explain the project-wide scope

Usage:
- One-time skip: SKIP_TS_CHECK=1 git commit
- Permanent skip: export SKIP_TS_CHECK=1 (add to shell profile)

This prevents blocking commits due to unrelated TypeScript errors while
still allowing teams to enforce TypeScript checking when desired.
Vercel uses path-to-regexp v6.1.0 which requires specific syntax:
- The ? modifier only applies to parameters (like :param?), not literals
- Using /? at the end of paths is invalid syntax
- Vercel handles trailing slashes automatically with strict: false

Changes:
- Removed /? suffix from all 423 redirect source patterns
- Pattern /anytrust/? → /anytrust (now matches both /anytrust and /anytrust/)
- Follows path-to-regexp v6.1.0 syntax requirements

This fixes the error:
"Redirect at index 1 has invalid source pattern /anytrust/?"

Refs: https://vercel.com/docs/errors/error-list#invalid-route-source-pattern
Fixed 4 additional patterns that had ? suffix without /:
- /sdk-docs/dataEntities/networks? → /sdk-docs/dataEntities/networks
- /sdk/introduction? → /sdk/introduction
- /sdk/utils_multicall? → /sdk/utils_multicall
- /stylus/tools/stylus-cli? → /stylus/tools/stylus-cli

These patterns were also invalid in path-to-regexp v6.1.0 syntax.
Vercel dev now starts without any pattern validation errors.
Co-authored-by: Copilot <[email protected]>
Added "trailingSlash": false to vercel.json to ensure all URLs with
trailing slashes are automatically redirected to their non-trailing-slash
equivalents. This provides consistent behavior across all 2,000+ redirects
without needing individual /? suffixes on each redirect pattern.
@vercel
Copy link

vercel bot commented Dec 26, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
arbitrum-docs Ready Ready Preview Jan 12, 2026 11:36pm

@anegg0 anegg0 changed the base branch from master to redirect-and-format-check-fix January 12, 2026 23:23
@anegg0 anegg0 changed the base branch from redirect-and-format-check-fix to master January 12, 2026 23:24
Copy link
Contributor

@anegg0 anegg0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants